Integrand size = 32, antiderivative size = 101 \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=-\frac {2^{\frac {1}{2}+n} c \operatorname {Hypergeometric2F1}\left (\frac {1}{2}+m,\frac {1}{2}-n,\frac {3}{2}+m,\frac {1}{2} (1+\sec (e+f x))\right ) (1-\sec (e+f x))^{\frac {1}{2}-n} (a+a \sec (e+f x))^m (c-c \sec (e+f x))^{-1+n} \tan (e+f x)}{f (1+2 m)} \]
-2^(1/2+n)*c*hypergeom([1/2-n, 1/2+m],[3/2+m],1/2+1/2*sec(f*x+e))*(1-sec(f *x+e))^(1/2-n)*(a+a*sec(f*x+e))^m*(c-c*sec(f*x+e))^(-1+n)*tan(f*x+e)/f/(1+ 2*m)
Time = 0.68 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.94 \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=\frac {2^{\frac {1}{2}+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-m,\frac {1}{2}+n,\frac {3}{2}+n,\frac {1}{2} (1-\sec (e+f x))\right ) (1+\sec (e+f x))^{-\frac {1}{2}-m} (a (1+\sec (e+f x)))^m (c-c \sec (e+f x))^n \tan (e+f x)}{f+2 f n} \]
(2^(1/2 + m)*Hypergeometric2F1[1/2 - m, 1/2 + n, 3/2 + n, (1 - Sec[e + f*x ])/2]*(1 + Sec[e + f*x])^(-1/2 - m)*(a*(1 + Sec[e + f*x]))^m*(c - c*Sec[e + f*x])^n*Tan[e + f*x])/(f + 2*f*n)
Time = 0.32 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3042, 4449, 80, 79}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (e+f x) (a \sec (e+f x)+a)^m (c-c \sec (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^m \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^ndx\) |
\(\Big \downarrow \) 4449 |
\(\displaystyle -\frac {a c \tan (e+f x) \int (\sec (e+f x) a+a)^{m-\frac {1}{2}} (c-c \sec (e+f x))^{n-\frac {1}{2}}d\sec (e+f x)}{f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle -\frac {a c 2^{n-\frac {1}{2}} \tan (e+f x) (1-\sec (e+f x))^{\frac {1}{2}-n} (c-c \sec (e+f x))^{n-1} \int \left (\frac {1}{2}-\frac {1}{2} \sec (e+f x)\right )^{n-\frac {1}{2}} (\sec (e+f x) a+a)^{m-\frac {1}{2}}d\sec (e+f x)}{f \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle -\frac {c 2^{n+\frac {1}{2}} \tan (e+f x) (1-\sec (e+f x))^{\frac {1}{2}-n} (a \sec (e+f x)+a)^m (c-c \sec (e+f x))^{n-1} \operatorname {Hypergeometric2F1}\left (m+\frac {1}{2},\frac {1}{2}-n,m+\frac {3}{2},\frac {1}{2} (\sec (e+f x)+1)\right )}{f (2 m+1)}\) |
-((2^(1/2 + n)*c*Hypergeometric2F1[1/2 + m, 1/2 - n, 3/2 + m, (1 + Sec[e + f*x])/2]*(1 - Sec[e + f*x])^(1/2 - n)*(a + a*Sec[e + f*x])^m*(c - c*Sec[e + f*x])^(-1 + n)*Tan[e + f*x])/(f*(1 + 2*m)))
3.2.51.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) ^FracPart[n]) Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) ), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !Integ erQ[n] && (RationalQ[m] || !SimplerQ[n + 1, m + 1])
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(c sc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a*c*(Cot[e + f *x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[c + d*Csc[e + f*x]])) Subst[Int[(a + b*x)^(m - 1/2)*(c + d*x)^(n - 1/2), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]
\[\int \sec \left (f x +e \right ) \left (a +a \sec \left (f x +e \right )\right )^{m} \left (c -c \sec \left (f x +e \right )\right )^{n}d x\]
\[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{m} {\left (-c \sec \left (f x + e\right ) + c\right )}^{n} \sec \left (f x + e\right ) \,d x } \]
\[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=\int \left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{m} \left (- c \left (\sec {\left (e + f x \right )} - 1\right )\right )^{n} \sec {\left (e + f x \right )}\, dx \]
\[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{m} {\left (-c \sec \left (f x + e\right ) + c\right )}^{n} \sec \left (f x + e\right ) \,d x } \]
\[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{m} {\left (-c \sec \left (f x + e\right ) + c\right )}^{n} \sec \left (f x + e\right ) \,d x } \]
Timed out. \[ \int \sec (e+f x) (a+a \sec (e+f x))^m (c-c \sec (e+f x))^n \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^m\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^n}{\cos \left (e+f\,x\right )} \,d x \]